<!DOCTYPE html>
<html>
<head>
    <title>多模态搜索系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css" rel="stylesheet">
    <link href="{{ url_for('static', filename='css/base.css') }}" rel="stylesheet">
    {% block styles %}{% endblock %}
</head>
<body>
    <!-- 侧边栏 -->
    <div class="sidebar">
        <div class="logo">
            <h4>
                <i class="bi bi-search-heart"></i>
                <span>多模态资源系统</span>
            </h4>
        </div>
        
        <!-- 导航菜单 -->
        <nav class="nav flex-column mt-4">
            <a class="nav-link {% if request.endpoint.startswith('resource.') %}active{% endif %}" 
               href="{{ url_for('resource.index') }}">
                <i class="bi bi-folder"></i> 资源管理
            </a>
            <a class="nav-link {% if request.endpoint.startswith('search.') %}active{% endif %}" 
               href="{{ url_for('search.index') }}">
                <i class="bi bi-search"></i> 多模态检索
            </a>
            <a class="nav-link {% if request.endpoint.startswith('translate.') %}active{% endif %}" 
               href="{{ url_for('translate.index') }}">
                <i class="bi bi-translate"></i> 多模态翻译
            </a>
        </nav>
        
        <!-- 用户信息 -->
        <div class="user-info">
            <div class="user-name d-flex align-items-center">
                <i class="bi bi-person-circle me-2"></i>
                <span>{{ username }}</span>
            </div>
            <a href="{{ url_for('logout') }}" class="btn btn-outline-secondary btn-sm w-100">
                <i class="bi bi-box-arrow-right"></i> 登出
            </a>
        </div>
    </div>

    <!-- 主要内容区 -->
    <div class="main-content">
        {% block content %}{% endblock %}
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    {% block scripts %}{% endblock %}
</body>
</html> 